<?php
/*
	[gunianwang system]
	NAME:in_mail_model
	AUTHOR:sql
	DATE:2012-07-10
*/
if (!defined('IN_ELS'))
{
    die('Hacking attempt');
}

class img_commentbase extends base {
	function img_commentbase() {
		$this->base();
	}



	
	//查询评论数量操作
	function getCommentCount($where){ 
		$sqlText = "select count(*) from gnw_img_comment ";
		$sqlText .= $where;
		$data=$this->db->result_first($sqlText);
		return $data;
	}
	//查询评论列表操作
	function getImgCommentList($where,$limitText){
		$sqlText  = "select *,FROM_UNIXTIME(create_time,'%Y-%m-%d %H:%i:%s') create_time from gnw_img_comment ";
		$sqlText .= $where;
		$sqlText .= " order by create_time desc ";
		$sqlText .= $limitText;
		$data=$this->db->fetch_all($sqlText);

		return $data;
	}

	
	

	function updateimgcomment($data,$where){
		$retValue = $this->dbUpdate("gnw_img_comment",$data,$where);
		return $retValue;
	}

	

	

}


?>